package com.xbongbong.admin.pojo;

import com.xbongbong.paas.constant.PaasConstant;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author 李翔
 * @date 2022/8/25
 * @description
 */
@Getter
@Setter
@ToString
public class StageRetainPojo implements Serializable {

    private static final long serialVersionUID = -7153501096795875399L;

    /**
     * 公司Id
     */
    private String corpid;

    /**
     * 备份应用Id, 用来区别同公司同应用同表单的多次备份
     */
    private Long retainAppId;

    /**
     * 客户表单Id列表
     */
    private List<Long> customerFormIdIn;

    /**
     * 线索表单Id列表
     */
    private List<Long> clueFormIdIn;

    /**
     * 机会表单Id列表
     */
    private List<Long> opportunityFormIdIn;

    /**
     * Paas表单Id列表
     */
    private List<Long> paasFormIdIn;

    /**
     * 所有Stage相关表单Id列表
     */
    private List<Long> stageFormIdIn;

    /**
     * 阶段流程Id列表
     */
    private List<Long> stageProcessIdIn;

    /**
     * 阶段Id列表
     */
    private List<Long> stageIdIn;

    public StageRetainPojo(String corpid, Long retainAppId, List<Long> customerFormIdIn,List<Long> clueFormIdIn,List<Long> opportunityFormIdIn,List<Long> paasFormIdIn) {
        this.corpid = corpid;
        this.retainAppId = retainAppId;
        this.customerFormIdIn = customerFormIdIn;
        this.opportunityFormIdIn = opportunityFormIdIn;
        this.clueFormIdIn = clueFormIdIn;
        this.paasFormIdIn = paasFormIdIn;

        stageFormIdIn = new ArrayList<>(PaasConstant.DEFAULT_INITIAL_CAPACITY);
        stageFormIdIn.addAll(customerFormIdIn);
        stageFormIdIn.addAll(clueFormIdIn);
        stageFormIdIn.addAll(opportunityFormIdIn);
        stageFormIdIn.addAll(paasFormIdIn);
        stageProcessIdIn = new ArrayList<>(PaasConstant.DEFAULT_INITIAL_CAPACITY);
        stageIdIn = new ArrayList<>(PaasConstant.DEFAULT_INITIAL_CAPACITY);
    }
}
